
//
//  DefinitionPch.h
//  优学荟管理系统
//
//  Created by 星道 on 17/6/26.
//  Copyright © 2017年 星道三好. All rights reserved.
//

//宠定义

#ifndef DefinitionPch_h
#define DefinitionPch_h
#define WXCallbackNotification @"WXCallback"  //微信回调通知

//获取沙盒 Cache
#define CachePath [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]
#define AccountFile @"AccountHistory.plist"
//充值星币的支付
#define  kMongyPay(string) [@"http://client.xing6688.com/money/" stringByAppendingString:string]



//////// 环境
//#define LLBaseURL(string) [NSString stringWithFormat:@"http://192.168.0.223:8080/StarShine/ys/%@",string]
//#define LLBaseURLTeacher(string) [NSString stringWithFormat:@"http://192.168.0.223:8080/StarShine/ws/%@",string]
//#define LLBaseURLs(string) [NSString stringWithFormat:@"http://192.168.0.223:8080/StarShine/ws/%@",string]



// 环境
//#define LLBaseURL(string) [NSString stringWithFormat:@"http://192.168.0.228:8080/StarShine/ys/%@",string]
//#define LLBaseURLTeacher(string) [NSString stringWithFormat:@"http://192.168.0.228:8080/StarShine/ws/%@",string]
//#define LLBaseURLs(string) [NSString stringWithFormat:@"http://192.168.0.228:8080/StarShine/ws/%@",string]
//


#define LLBaseURL(string) [NSString stringWithFormat:@"http://192.168.0.226:8080/StarShine/ys/%@",string]
#define LLBaseURLTeacher(string) [NSString stringWithFormat:@"http://192.168.0.226:8080/StarShine/ws/%@",string]
#define LLBaseURLs(string) [NSString stringWithFormat:@"http://192.168.0.226:8080/StarShine/ws/%@",string]



//正式服务器
//#define LLBaseURL(string) [NSString stringWithFormat:@"http://client.xing6688.com/ys/%@",string]
//#define LLBaseURLTeacher(string) [NSString stringWithFormat:@"http://client.xing6688.com/ws/%@",string]
//#define LLBaseURLs(string) [NSString stringWithFormat:@"http://client.xing6688.com/ws/%@",string]




// 网络错误打印
#define NetErr @"链接超时"

#define kStatusBarHeight [[UIApplication sharedApplication] statusBarFrame].size.height
#define kNavBarHeight 44.0
#define kTabBarHeight ([[UIApplication sharedApplication] statusBarFrame].size.height>20?83:49)
#define kTopHeight (kStatusBarHeight + kNavBarHeight)

//宽高
#define SCREEN_WIDTH   [UIScreen mainScreen].bounds.size.width
#define SCREENH_HEIGHT [UIScreen mainScreen].bounds.size.height
#define kScreenWidth [UIScreen mainScreen].bounds.size.width
#define kScreenHeight [UIScreen mainScreen].bounds.size.height
#define SCREEN_HEIGHT  [UIScreen mainScreen].bounds.size.height
//比例
#define KScale SCREEN_WIDTH/320.0f

//颜色
#define ColorRGB(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define ColorRGBA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(r)/255.0 blue:(r)/255.0 alpha:a]
#define ColorRandom [UIColor colorWithRed:arc4random_uniform(256)/255.0 green:arc4random_uniform(256)/255.0 blue:arc4random_uniform(256)/255.0 alpha:1.0]

#define iPhone5 ([UIScreen mainScreen].bounds.size.height == 568)
// 判断是否为iOS7
#define iOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >=7.0)
#define LLLoading   @"正在加载......"

//字体适配，高度适配
#define kARHeightTranslator(padding) (padding * kScreenWidth / 667.0)
//宽度适配
#define kARWidthTranslator(padding) (padding * kScreenHeight / 375.0)

//发布状态下不使用打印功能
#ifdef DEBUG
#define Log(...) NSLog(@"%s 第%d行 \n %@\n\n",__func__,__LINE__,[NSString stringWithFormat:__VA_ARGS__])
#else
#define Log(...)


//强弱引用
#define WeakSelf(type)  __weak typeof(type) weak##type = type;
#define StrongSelf(type)  __strong typeof(type) type = weak##type;

#endif
#endif /* DefinitionPch_h */
